package com.avocado.base.dto.user;

import com.avocado.base.validator.user.UserAddNameValidation;
import com.avocado.base.validator.user.UserPasswordValidation;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@EqualsAndHashCode(callSuper = true)
@Data
@UserPasswordValidation(field1 = "password",field2 = "confirmPassword")
public class UserAddDto extends UserDto{


	@NotBlank(message = "操作失败,用户名不能为空!")
	@NotNull(message ="操作失败,用户名不能为空!")
	@UserAddNameValidation
	private String name;


	@NotBlank(message = "操作失败,密码不能为空!")
	@NotNull(message ="操作失败,密码不能为空!")
	private String password;

	@NotBlank(message = "操作失败,确认密码不能为空!")
	@NotNull(message ="操作失败,确认密码不能为空!")
	private String confirmPassword;

}
